#pragma strict
//////////////////////////////////////////////////////
///输出 Transform信息
//////////////////////////////////////////////////////

@MenuItem("Level4/Export/ExportTransformInfo")
static function Init(){
	var tr:Transform = Selection.activeTransform;
	ExportTransform(tr);
}

private static function ExportTransform(tr:Transform):void{
	if(tr){
		var t:Vector3 = tr.localPosition;
		var r:Vector3 = tr.localEulerAngles;
		var s:Vector3 = tr.localScale;
		
		var path:String = EditorUtility.SaveFilePanel("导出transform信息","","transform","txt");
		if(! String.IsNullOrEmpty(path)){
			var sb:StringBuilder = new StringBuilder();
				sb.Append(t).Append(r).Append(s);
			System.IO.File.AppendAllText(path,sb.ToString(),Encoding.UTF8);
		}
	}
}